package chap3_9;

import java.util.Scanner;

public class Exer3_9_7 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("输入一个数：");
        int n = input.nextInt();
        int sum = 0;
        int i = 0;
        int temp = n;
        while (n != 0) {
            i = n % 10;
            sum = sum * 10 + i;
            n = n / 10;
        }
        if (sum == temp) {
            System.out.println("这个数是回文数");
        } else {
            System.out.println("这个数不是回文数");
        }
    }
}
